package com.example.springboot;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: HelloWorldController
 * @Author wenlinyu
 * @Date: 2020/12/14 17:44
 * @Version 1.0
 */
@RestController
public class HelloWorldController {

    @GetMapping("/hello")
    public String hello() {
        return "hello world";
    }

    @PostMapping("/sayHello")
    public String sayHello(String name) {
        return "hello " + name;
    }
}
